<?php

namespace App\Http\Controllers;

/**
 *
 * Author: TheSmile
 * Date: 2023/5/19 14:29
 * Email: <594652523@qq.com>
 */
class TestController
{

    public function index()
    {
        $arr    = [];
        $coords = [
            '274,640,237,670,211,691,193,725,194,756,199,772,209,778,227,780,234,793,263,784,266,771,242,755,235,721,288,658',
            '397,540,411,597,403,655,427,659,433,712,452,730,463,720,449,705,454,663,448,648,457,598,446,553,424,550',
            '141,459,168,460,191,484,220,512,253,564,256,605,251,620,254,644,255,651,277,632,284,610,284,596,268,539,213,466,198,453,168,439,133,437'
        ];
        for ($i = 0; $i < 3; $i++) {
            $data['id']         = $i + 1;
            $data['coords']     = $coords[$i];
            $data['content']    = [
                '问渠那得清如许',
                '为有源头活水来'
            ];
            $data['status_tip'] = '已售罄' . ($i + 1);
            $data['mp3_src']    = 'index' . ($i + 1) . '.mp3';
            $data['mp3_time']   = ($i + 1) . '″';
            $arr[]              = $data;
        }
        return view('test', ['list' => $arr]);
    }

    public function show()
    {
        $imgName = request('img');
        $imgName .= '.gif';
        return view('test1', ['img_name' => $imgName]);
    }

    public function live()
    {
        return view('live');
    }

    public function live2()
    {
        return view('live2');
    }

    public function search()
    {
        return view('search');
    }
}

